<% layout('/layout/default.html', {title: '文件夹管理', libs: ['validate']}){ %>
<div class="main-content">
		<div class="card-header">
			<i class="fa fa-sitemap"></i>添加子级文件夹
		</div>
		<#form:form id="inputForm" model="${sysFileTree}" class="form-horizontal" action="${ctx}/filetree/sysFileTree/save" method="post">
			<div class="card-body">
				<div class="row">
					<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
						<div class="form-group row">
							<label class="col-form-label col-lg-4 col-md-4 text-right" title="父级文件夹名称">
								<span style="color:red;" aria-required="true">*</span> 父级文件夹名称：<i class="fa icon-question hide"></i></label>
							<div class="col-lg-8 col-md-8 ">
								<div class="form-control form-control-sm" readonly="readonly">${sysFileTree.parentName}</div>
								<input name="parentId" type="hidden" value="${sysFileTree.parentId}" /> 
							</div>
						</div>
					</div>
					<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
						<div class="form-group row">
							<label class="col-form-label col-lg-4 col-md-4 text-right" title="文件夹名称">
								<span style="color:red;" aria-required="true">*</span> 文件夹名称：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-lg-8 col-md-8 ">
								<#form:input path="name" maxlength="100" class="form-control form-control-sm required" />
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
						<div class="form-group row">
							<label class="col-form-label col-lg-4 col-md-4 text-right" title="排序">
								<span style="color:red;" aria-required="true">*</span> 排序：<i class="fa icon-question hide"></i></label>
							<div class="col-lg-8 col-md-8 ">
								<#form:input path="sort" maxlength="100" class="form-control form-control-sm required "/>
							</div>
						</div>
					</div>
					<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
						<div class="form-group row">
							<label class="col-form-label col-lg-4 col-md-4 text-right" title="机房备注信息">
								备注信息：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-lg-8 col-md-8 ">
								<#form:textarea path="remarks" rows="3" cols="32"  class="form-control"></#form:textarea>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="box-footer">
				<div class="row">
					<div class="offset-md-2 col-md-10">
					<% if (hasPermi('filetree:sysFileTree:edit')){ %>
						<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 保 存</button>
					<% } %>
						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="window.parent.closeCurrentTabPage();"><i class="fa fa-reply-all"></i> 关 闭</button>
					</div>
				</div>
			</div>
		</#form:form>
</div>
<% } %>
<script>
$("#inputForm").validate({
	submitHandler: function(form){
		js.ajaxSubmitForm($(form), function(data){
			js.showMessage(data.message);
			if(data.result == 'true'){
				window.parent.closeCurrentTabPage(window.parent.refreshTab);
			}
		});
    }
});
</script>